<template>
  <van-tabs v-model:active="active">

    <van-tab title="找队伍" name="recommendations" to="/team">
    </van-tab>
    <van-tab title="我的队伍" name="public" to="/user/team/join">
    </van-tab>
  </van-tabs>
  <router-view></router-view>
</template>

<script setup lang="ts">

import {onMounted} from "vue";
import {useRoute, useRouter} from "vue-router";
const route=useRoute();
const router=useRouter();
onMounted(() => {
  // 当组件挂载时，如果当前路由不是推荐页，则导航到推荐页
  if (route.path !== '/team') {
    router.push('/team');
  }
});
</script>
<style scoped>

</style>